#include <iostream>
#include "asio_http/http_server.hpp"



struct http_request_handler
{
    typedef basic_http_connection<http_request_handler> connection;
    void operator()(const connection::pointer & ptr)
    {
        std::cout<<ptr->get_request_url()<<std::endl;
        ptr->send_response(200, "Hello world!");
    }
};



int main(int argc, char** argv){
    asio::io_service io_svc;
    http_server<http_request_handler> server(io_svc, asio::ip::tcp::endpoint(asio::ip::tcp::v4(), 5000));
    io_svc.run();
    return 0;

}
